package FizzBuzzExercise;

import java.util.Scanner;

/**
 * Created by venus on 12/09/14.
 */
public class FizzBuzz {
    public static void main(String[] args) {

        int numberDivisibleBy3;
        int numberDivisibleBy5;

        for (int currentNumber = 1; currentNumber < 101; currentNumber++) {

            numberDivisibleBy3 = currentNumber % 3;
            numberDivisibleBy5 = currentNumber % 5;

            if (numberDivisibleBy3 == 0) {
                PrintThe("Fizz");
                if (numberDivisibleBy5 == 0) {
                    PrintThe("Buzz");
                }
            } else if (numberDivisibleBy5 == 0) {
                PrintThe("Buzz");
            } else {
                PrintThe(currentNumber);
            }
            System.out.println();
        }
    }

    private static void PrintThe(Object obj) {
        System.out.print(obj);
    }

}
